package zhu;

import javax.swing.*;
import java.awt.*;

public class StudentPanel extends JFrame {
    public StudentPanel() {
        setTitle("Student Panel");
        setSize(400, 300);
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); 
        setLocationRelativeTo(null);
        setLayout(new FlowLayout());

        JButton viewScoresButton = new JButton("View Scores");
        JButton takeExamButton = new JButton("Take Exam");
        JButton logoutButton = new JButton("Logout");

        add(viewScoresButton);
        add(takeExamButton);
        add(logoutButton);

        logoutButton.addActionListener(e -> {
            new Login().setVisible(true); 
            dispose(); 
        });

    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            new StudentPanel().setVisible(true);
        });
    }
}